
#include <boost/lexical_cast.hpp>
#include "Record.h"
#include "DBHelper.h"

namespace Client {
namespace Common {

CRecord::CRecord(CDBCursor& c)
{
	c.GetInt(0, mIndex);
}

std::string& CRecord::GetValueDesc(string& v) 
{
	mStringPool.insert(mStringPool.begin(), string("'") + v + "'");
	return mStringPool[0];
}

std::string& CRecord::GetValueDesc(int v)
{
	mStringPool.insert(mStringPool.begin(), boost::lexical_cast<string>(v));
	return mStringPool[0];
}

string& CRecord::GetValueDesc(Util::CSystem::Int64 v)
{
	mStringPool.insert(mStringPool.begin(), boost::lexical_cast<string>(v));
	return mStringPool[0];
}

string& CRecord::GetValueDesc(string& v, string& buf)
{
	buf = string("'") + v + "'";
	return buf;
}

string& CRecord::GetValueDesc(int v, string& buf)
{
	buf = boost::lexical_cast<string>(v);
	return buf;
}

} // Common
} // Client